package edu.msg.jthr.backend.model;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

@Entity
@Table(name = "CANDIDATE")
public class Candidate extends BaseEntity {

	private static final long serialVersionUID = 1L;

	@NotNull
	@Column(name = "FIRSTNAME")
	private String firstName;

	@NotNull
	@Column(name = "LASTNAME")
	private String lastName;

	@NotNull
	@Column(name = "PHONE_NUMBER")
	private String phoneNumber;

	@NotNull
	@Column(name = "MOBILE_NUMBER")
	private String mobileNumber;

	@NotNull
	@Column(name = "MAIL")
	private String mail;

	@Column(name = "ADDRESS")
	private String address;

	@Column(name = "RELOCATION")
	private Boolean relocation;

	@Column(name = "HIRED")
	private Boolean hired;
	
	// @NotNull
	@Column(name = "CV")
	private byte[] cv;
	@OneToMany(cascade = { CascadeType.ALL})
	private List<Interview> interview;
	
	@OneToMany(cascade = { CascadeType.ALL })
	private List<Comment> comments;

	public Candidate() {
	}

	public Candidate(Long id, String uuid, String firstName, String lastName,
			String phoneNumber, String mobileNumber, String mail,
			String address, Boolean relocation,Boolean hired, byte[] cv,
			List<Interview> interview, List<Comment> commentList) {
		super(id, uuid);
		this.firstName = firstName;
		this.lastName = lastName;
		this.phoneNumber = phoneNumber;
		this.mobileNumber = mobileNumber;
		this.mail = mail;
		this.address = address;
		this.relocation = relocation;
		this.hired = hired;
		this.cv = cv;
		this.interview = interview;
		this.comments = commentList;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getPhoneNumber() {
		return phoneNumber;
	}

	public void setPhoneNumber(String phoneNumber) {
		this.phoneNumber = phoneNumber;
	}

	public String getMobileNumber() {
		return mobileNumber;
	}

	public void setMobileNumber(String mobileNumber) {
		this.mobileNumber = mobileNumber;
	}

	public String getMail() {
		return mail;
	}

	public void setMail(String mail) {
		this.mail = mail;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public Boolean getRelocation() {
		return relocation;
	}

	public void setRelocation(Boolean relocation) {
		this.relocation = relocation;
	}

	public Boolean getHired() {
		return hired;
	}

	public void setHired(Boolean hired) {
		this.hired = hired;
	}

	public byte[] getCv() {
		return cv;
	}

	public void setCv(byte[] cv) {
		this.cv = cv;
	}

	public List<Interview> getInterview() {
		return interview;
	}

	public void setInterview(List<Interview> interview) {
		this.interview = interview;
	}

	public List<Comment> getComments() {
		return comments;
	}

	public void setComments(List<Comment> comments) {
		this.comments = comments;
	}

}
